package com.groovy.learning

import groovy.text.GStringTemplateEngine

def f = new File('C:\\grails_training\\workspace\\intro_groovy\\template.txt')

engine = new GStringTemplateEngine()
def binding = ["stg1":"prenom1", "stg2":"prenom2", "stg3":"prenom3"]
template = engine.createTemplate(f).make(binding)
println template.toString()